import { requestSystemClient } from '#/api/request';

export namespace SystemDictApi {
  export interface SystemDictType {
    [key: string]: any;
    type_id: number;
    type_name: string;
    dictItem: string;
    type_status: number;
    remark?: string;
  }
  export interface SystemDictData {
    [key: string]: any;
    data_id: number;
    data_sort: number;
    data_label: string;
    data_value: string;
    dictItem: string;
    data_status: number;
    color_type: string;
    css_class: string;
    remark?: string;
  }
}

/**
 * 获取字典值数据
 */
async function getSimpleDictDataList() {
  const data = requestSystemClient.get<Array<SystemDictApi.SystemDictData>>(
    '/system/dict-data/list-all-simple',
  );
  return data;
}
export { getSimpleDictDataList };
